<%-- 
    Document   : ContrasteProgramacion
    Created on : 30-nov-2011, 17:29:58
    Author     : Luis
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<jsp:include page="includes/header.jsp" flush="true"/>
<jsp:include page="includes/menuconf.jsp" flush="true"/>
<script type="text/javascript">
    $(function(){
            $('#calendar').fullCalendar({   
                  editable: true,
                  header: {
                      left: 'prev',
                      center: 'title today',
                      right: 'next'
                  },
                  defaultView: 'month',      
                  height: 1000,
                  slotMinutes: 30,
                  minTime : 8,
                  maxTime : 21,
                  firstDay : 1,
                  allDaySlot : false,
                  columnFormat:'dddd',
                  unselectAuto: false,
                  weekends: false,
                  eventClick: function(event, jsEvent){
                      if(event.url){
                          
                      }
                  }
            });
    });
    $(function() {
                $("#suministro").autocomplete({
                    source: "/Cielsa_v3/Admin/searchSource.jsp?cat=suministro",
                    dataType: "json",
                    select: function(event, ui) {
                        $('#idmedidor').val(ui.item.id);
                    }
                });
                $("#tecnico").autocomplete({
                    source: "/Cielsa_v3/Admin/searchSource.jsp?cat=tecnico",
                    dataType: "json",
                    select: function(event, ui) {
                        $('#idtecnico').val(ui.item.id);
                    }
                });
                $("#contrato").autocomplete({
                    source: "/Cielsa_v3/Admin/searchSource.jsp?cat=contrato",
                    dataType: "json",
                    select: function(event, ui) {
                        $('#idtecnico').val(ui.item.id);
                    }
                });
                $("#zona").autocomplete({
                    source: "/Cielsa_v3/Admin/searchSource.jsp?cat=zona",
                    dataType: "json",
                    select: function(event, ui) {
                        $('#idtecnico').val(ui.item.id);
                    }
                });
    });
</script>
<fieldset class="fieldForm">
    <legend>Contrastes - Programación</legend>
    <form action="Admin/procProgram.jsp" method="POST">
        <div id="dates">
            <table class="tableForm">
              <tr>
                  <td>Desde</td>
                  <td>
                     <input type="text" id="from" name="from"/>
                  </td>
                  <td>A</td>
                  <td>
                      <input type="text" id="to" name="to"/>
                  </td>
              </tr>
              <tr>
                  <td>Suministro</td>
                  <td>
                      <input type="text" id="suministro" name="suministro"/>
                      <input type="hidden" id="idmedidor" name="idmedidor" value="" />
                  </td>
                  <td>Tecnico</td>
                  <td>
                      <input type="text" id="tecnico" name="tecnico"/>
                      <input type="hidden" id="idtecnico" name="idtecnico" value="" />
                  </td>
              </tr>
              <tr>
                  <td>Contrato</td>
                  <td>
                      <input type="text" id="contrato" name="contrato"/>
                      <input type="hidden" id="idcontrato" name="idcontrato" value="" />
                  </td>
                  <td>Zona</td>
                  <td>
                      <input type="text" id="zona" name="zona"/>
                      <input type="hidden" id="idzona" name="idzona" value="" />
                  </td>
              </tr>
              <tr>
                  <td colspan="3">
                      &nbsp;
                  </td>
                  <td>
                      <input type="submit" value="Registrar" name="registrar" style="float: right;" />
                  </td>
              </tr>
            </table>
        </div>
    </form>
    <div id="calendar"></div>
</fieldset>
<jsp:include page="includes/footer.jsp" flush="true" />  
